package cn.jiyun.feign;

import cn.jiyun.dto.*;
import cn.jiyun.pojo.ConsumerContestTopic;
import cn.jiyun.utils.Result;
import cn.jiyun.vo.ContestVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

/**
 * @author 季乾帅
 * @create 2023/8/28 16:03
 */
@FeignClient(name = "Contest")
public interface ContestFeign {

    @RequestMapping("contest/findAll")
    public Result findAll(@RequestParam(value = "classroomId") String classroomId, @RequestBody ContestDTO contestDTO);

    @RequestMapping("contest/findClassroom")
    public Result findClassroom();

    @GetMapping("contest/findGame")
    public Result findGame(@RequestParam(value = "classroomId") Integer classroomId);

    @GetMapping("contest/findTeam")
    public Result findTeam();

    @PostMapping("contest/saveContestya")
    public Result saveContestya(@RequestParam("userId") String userId,@RequestBody ContestVO contestVO);

    @PostMapping("contest/findTest")
    public Result findTest(@RequestParam("consumerId") String consumerId, @RequestBody ConsumerContestTopicDTO dto);

    @GetMapping("contest/findTests")
    public Result findTests(@RequestParam(value = "id") String id);

    @GetMapping("contest/findNum")
    public Result findNum(@RequestParam("consumerId") Integer consumerId);

    @GetMapping("contest/findTopic")
    public Result findTopic(@RequestParam(value = "consumerId") Integer consumerId, @RequestParam(value = "topicId") Integer topicId);


    @PostMapping("contest/findTrain")
    public Result findTrain(@RequestParam(value = "classroomId") String classroomId, @RequestBody TrainDTO dto);

    /*   @GetMapping("contest/findTrainCourse")
       public Result findTrainCourse(@RequestParam(value = "uid") String uid);
   */
    @GetMapping("contest/findById")
    public Result findById(@RequestParam(value = "trainId") String trainId);

    @GetMapping("contest/findOrCourse")
    public Result findOrCourse(@RequestParam(value = "trainId") String trainId, @RequestParam("uid") String uid);

    @PostMapping("contest/findPaper")
    public Result findPaper(@RequestParam(value = "classroomId") String classroomId, @RequestBody PaperDTO dto);

    @PostMapping("contest/toSave")
    public Result toSave(@RequestBody ConsumerContestTopic consumerContestTopic);

    @GetMapping("contest/findTihao")
    public Result findTihao(@SpringQueryMap ConsumerContestTopic consumerContestTopic);

    @GetMapping("contest/findShiJuan")
    public Result findShiJuan(@RequestParam(value = "contestId") String contestId);

    @GetMapping("contest/QueryTimu")
    public Result queryTimu(@RequestParam(value = "tiId") String tiId);

    @GetMapping("contest/findZq")
    public Result findZq(@RequestParam(value = "timuId") String timuId);

    @PostMapping("contest/findTeams")
    public Result findTeams(@RequestParam(value = "userId") String userId, @RequestBody TeamDTO dto);

    @PostMapping("contest/findMyContest")
    public Result findMyContest(@RequestParam(value = "userId") String userId, @RequestBody ContestDTO dto);

    @PostMapping("contest/mySum")
    Result mySum(@RequestBody ConsumerContestTopic consumerContestTopic);

    @GetMapping("contest/findMyUser")
    public Result findMyUser(@RequestParam(value = "userId") String userId);

    @GetMapping("contest/findorlTest")
    public Result findorlTest(@RequestParam(value = "userId") String userId);

}
